<template>
    <div>
        <detail-banner
            :sightName = 'this.sightName'
            :bannerImg = 'this.bannerImg'
            :gallaryImgs = 'this.gallaryImgs'
        ></detail-banner>
        <detail-header></detail-header>
        <detail-list :list='categoryList'></detail-list>
        <div class="conents"></div>
    </div>
</template>

<script>
/* eslint-disable */
import axios from 'axios'
import detailBanner from './compinents/banner'
import detailHeader from './compinents/header'
import detailList from './compinents/list'
export default {
    name: 'detail',
    components: {
        detailBanner,
        detailHeader,
        detailList
    },
    data(){
        return {
            categoryList: [],
            sightName: '',
            bannerImg: '',
            gallaryImgs: []
        }
    },
    methods: {
        getDetailInfo() {
            axios.get('/api/detail.json',{
                params:{
                    id: this.$route.params.id
                }
            }).then(this.getDetailInfosuss)
        },
        getDetailInfosuss(res) {
            res = res.data
            if(res.ret && res.data){
                const data = res.data
                this.categoryList = data.categoryList
                this.sightName = data.sightName
                this.bannerImg = data.bannerImg
                this.gallaryImgs = data.gallaryImgs
            }
        }
    },
    activated() {
        this.getDetailInfo()
    }
}
</script>

<style lang="stylus" scoped>
    .conents
        height 50rem
</style>
